package com.fhz.day006;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

/**
 * 时间:2022/5/24
 *
 * @author msfeng
 * 简述: TODO
 */
@Entity
public class User {
    @PrimaryKey(autoGenerate = true)  //如果id没有设置为自增,那么在在第二次插入的时候,报错. 主键相同的恶错误.
    public int uid;

    @ColumnInfo(name = "username")
    public String name; //username

    public String address;


    @ColumnInfo(defaultValue = "18")
    public int age;

    @ColumnInfo(defaultValue = "1")
    public int age1;

}

